<div id="manager">
    <div>
        <div id="bg-title1"><img src="/images/bg-title1.jpg" alt=""></div>
        <div id="bg-title2"><img src="/images/icon-title.jpg" alt="" style="margin-right: 8px;">Thiết lập quyền cho thành viên</div>
        <div id="bg-title3"><img src="/images/bg-title3.jpg" alt=""></div>
    </div>

    <div id="content">
        <div class="area-button">
            <div class="area-button1">
                <a href="javascript:;" onclick="document.frmEditUser.submit();return false;" class="button">Cập nhật</a>
            </div>
            <div class="clearfloat"></div>
        </div>
        <div>
            <div class="area-content1">
                <form name="frmEditUser" method="post" action="/admin/setperm?id=<?php echo $user['id'] ?>">
                <div>
                    <div class="form">
                        <div class="form1"><b>Tên thành viên</b></div>
                        <div class="form2">
                            <b><?=$user['name']?></b>
                        </div>
                        <div class="clearfloat"></div>
                    </div>
                    <div class="form">
                        <div class="form1"><b>Nhóm</b></div>
                        <div class="form1"><?php
                            for($i =0; $i < sizeof($arrGroup); $i ++){?>
                                <div><?=$arrGroup[$i]['name']?></div><?
                            }?>
                        </div>
                        <div class="clearfloat"></div>
                    </div>
                    <div class="form">
                        <table class="datagrid" width="100%" cellspacing="1" border="0">
                            <tbody>
                                <tr>
                                    <th class="cellleft">Quyền</th>
                                    <th width="30">IN</th>
                                    <th width="30">Yes</th>
                                    <th width="30">No</th>
                                </tr>
                                <?php foreach($modules AS $module): ?>
                                <tr>
                                    <td class="cellleft" colspan="5" bgcolor="#f1f1f1"><b><?php echo ucfirst($module['name']) ?></b></td>
                                </tr>
                                    <?php foreach($module['actions'] AS $action): ?>
                                    <tr>
                                        <td class="cellleft"><?php echo $action['description'] ?></td>
                                        <td<?php echo $action['perm']==2 ? ' class="focus"' : '' ?>><input type="radio" name="action-<?php echo $action['id'] ?>" value="2" <?php echo $action['perm']==2 ? 'checked=checked' : '' ?> /></td>
                                        <td<?php echo $action['perm']==1 ? ' class="focus"' : '' ?>><input type="radio" name="action-<?php echo $action['id'] ?>" value="1" <?php echo $action['perm']==1 ? 'checked=checked' : '' ?> /></td>
                                        <td<?php echo $action['perm']==0 ? ' class="focus"' : '' ?>><input type="radio" name="action-<?php echo $action['id'] ?>" value="0" <?php echo $action['perm']==0 ? 'checked=checked' : '' ?> /></td>
                                    </tr>
                                    <?php endforeach; ?>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                    <div style="text-align:right;" class="form">
                        <b>IN</b>: Kế thừa | <b>Yes</b>: Cho phép | <b>No</b>: Không cho phép
                    </div>
                </div>
                </form>
                <div class="clearfloat"></div>
           </div>
        </div>
   </div>
</div>
<div class="clearfloat"></div>

